<template>
	<view class="main">
		<no-more v-if="show"></no-more>
		<!-- <view class="date">
			<text>近一月</text>
			<image :src="xialaimg" mode="" class="xialaimg"></image>
		</view> -->
		<uni-card v-for="(item,index) in list" :key='index'>
			<view class="card_ft1">
				<view class="typename">
					{{item.comment}}
				</view>
				<view class="money" :style="{color:item.orderStatus == 0 ? '#04D400' : '#FF3838'}">
					{{item.amount}}
				</view>
			</view>
			<view class="card_ft2">

				<view class="datetime">
					{{item.createTime}}
				</view>
				<view class="content">
					<!-- {{item.content}} -->
					交易成功
				</view>
			</view>
		</uni-card>
	</view>
</template>

<script>
	import {
		imgBaseUrl
	} from '@/utils/baseUrl.js'
	import { currencyList } from '../../../utils/myapi.js'
	import noMore from '../../../components/no-data/no-more.vue';
	export default {
		components:{noMore},
		data() {
			return {
				xialaimg: imgBaseUrl + '/img/missimg/xiala.png',
				pageNo:1,
				show:false,
				list: []
			};
		},
		onLoad(){
			this.getList();
		},
		methods:{
			async getList(){
				const res = await currencyList(this.pageNo);
				console.log('res============>',res)
				
				this.list = [...this.list,...res?.result?.records]
				if(this.list.length == 0){
					this.show = true;
				}
			}
		},
		onReachBottom(){
			this.pageNo++;
			this.getList();
		},
		onHide(){
			this.show = false
		}
	}
</script>

<style lang="less" scoped>
	.main {
		width: 100%;
		height: 100vh;
		background: #F5F5F5;
		padding-top: 10rpx;

		.date {
			padding: 25rpx 25rpx 0 25rpx;
			.xialaimg {
				width: 20rpx;
				height: 20rpx;
				vertical-align: middle;
				margin-left: 10rpx;
			}
		}

		.card {
			height: 140rpx;
		}

		/deep/ .uni-card__content {
			// display: flex;
			// justify-content: space-between;
		}

		/deep/ .uni-card--border {
			border-radius: 16rpx 16rpx;
		}

		.card_ft1 {
			padding-top: 15rpx;
			display: flex;
			justify-content: space-between;

			.typename {
				font-size: 30rpx;
				font-family: PingFang SC-Medium, PingFang SC;
				font-weight: 500;
				color: #333333;
			}

			.money {
				font-size: 32rpx;
				font-family: PingFang SC-Medium, PingFang SC;
				font-weight: 500;

			}


		}

		.card_ft2 {
			padding-top: 15rpx;
			padding-bottom: 15rpx;
			display: flex;
			justify-content: space-between;

			.datetime {
				font-size: 24rpx;
				font-family: PingFang SC-Regular, PingFang SC;
				font-weight: 400;
				color: #999999;
			}

			.content {
				font-size: 24rpx;
				font-family: PingFang SC-Regular, PingFang SC;
				font-weight: 400;
				color: #999999;
			}
		}
	}
</style>